package com.sxbbc.common.core.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.function.common.GetRest;
import com.function.common.RestResponse;
import com.sxbbc.common.basics.exceptions.ThrowJsonException;
import com.sxbbc.common.core.entity.jz.InfoShopping;
import com.sxbbc.common.core.mapper.jz.InfoShoppingMapper;
import com.sxbbc.common.core.service.IInfoShoppingService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 平台购物定时配置表 服务实现类
 * </p>
 *
 * @author leehao
 * @since 2019-04-29
 */
@Service
public class InfoShoppingServiceImpl extends ServiceImpl<InfoShoppingMapper, InfoShopping> implements IInfoShoppingService {

    @Override
    public RestResponse editShopInfo(InfoShopping info) {
        boolean save = super.saveOrUpdate(info);
        if (!save) {
            throw new ThrowJsonException("保存购物配置信息失败");
        }
        return GetRest.getSuccess("保存成功");
    }
}
